The regiment was initially formed on 29 June 1682 by Elector Max Emanuel of Bavaria as one of the units in the standing army of the Electorate of Bavaria. In the course of the 17th and the 18th centuries, the unit participated in major European wars wherever Bavarian troops were involved. Notably, the regiment fought in campaigns related to the War of Spanish Succession, one of many instances where Bavarian units were heavily engaged in imperial and coalition warfare activities.
When the Bavarian Army was restructured in the 19th century—especially after the Napoleonic Wars—the formation was assigned the number 10th Infantry Regiment. Afterwards, it received the honorific name "King Ludwig" which signified that the regiment was under the patronage of the Bavarian monarch and that it occupied a certain rank within the army's organizational structure.
After the unification of Germany in 1871, the regiment became part of the armed forces of the German Empire, while retaining its Bavarian identity and traditions. During World War I, it served on the Western Front as part of the Bavarian contingent of the German field army. The regiment remained in active service until the collapse of the German war effort and the subsequent dissolution of the Bavarian Army following the November Revolution of 1918.
The regiment forms part of the Bavarian Army's institutional historiography and can be contextualized within scholarship on the German Empire's contingent-based military federalism prior to 1918.